package com.app.designpattern.structural.proxy1;

import android.util.Log;

/**
 * USER: zjw
 * DATA: 2019/4/25 0025
 * TIME: 上午 11:30
 */
public class CarLogProxy implements Moveable {
    private Moveable moveable;

    public CarLogProxy(Moveable moveable) {
        this.moveable = moveable;
    }

    @Override
    public void run() {
        doAfterSomthing();
        moveable.run();
        doBeforSomthing();
    }

    private void doAfterSomthing() {
        Log.i("proxy1", "开始显示日志..");
    }

    private void doBeforSomthing() {
        Log.i("proxy1", "日志显示结束..");
    }
}
